package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.base.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 交易流水表 wdy_txn_history
 * 
 * @author ruoyi
 * @date 2019-03-12
 */
public class WdyTxnHistory extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** 主键（自动增长） */
	@TableId(type = IdType.AUTO)
	private Long id;
	/** 用户ID */
	private String userId;
	/** 交易id */
	private String txnId;
	/** 流水类型 */
	private Integer txnType;
	/** 变化金额 */
	private BigDecimal txnAmount;
	/** 金额类型 */
	private Integer amountType;
	/** 交易时间 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date txnTime;
	/** 交易描述 */
	private String txnDesc;
	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setUserId(String userId) 
	{
		this.userId = userId;
	}

	public String getUserId() 
	{
		return userId;
	}
	public void setTxnId(String txnId) 
	{
		this.txnId = txnId;
	}

	public String getTxnId() 
	{
		return txnId;
	}
	public void setTxnType(Integer txnType) 
	{
		this.txnType = txnType;
	}

	public Integer getTxnType() 
	{
		return txnType;
	}
	public void setTxnAmount(BigDecimal txnAmount) 
	{
		this.txnAmount = txnAmount;
	}

	public BigDecimal getTxnAmount() 
	{
		return txnAmount;
	}
	public void setAmountType(Integer amountType) 
	{
		this.amountType = amountType;
	}

	public Integer getAmountType() 
	{
		return amountType;
	}
	public void setTxnTime(Date txnTime) 
	{
		this.txnTime = txnTime;
	}

	public Date getTxnTime() 
	{
		return txnTime;
	}
	public void setTxnDesc(String txnDesc)
	{
		this.txnDesc = txnDesc;
	}

	public String getTxnDesc()
	{
		return txnDesc;
	}

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("txnId", getTxnId())
            .append("txnType", getTxnType())
            .append("txnAmount", getTxnAmount())
            .append("amountType", getAmountType())
            .append("txnTime", getTxnTime())
            .append("txnDesc", getTxnDesc())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
